package socket;

import java.util.Arrays;

public class Demo {
	public static void main(String[] args) {
		int pw = 22;
		int[] allOut = {56,78,35,1243,86,234,66,22,456,8235,34};
		System.out.println(Arrays.toString(allOut));
		//将pw从数组中删除
		for(int i=0;i<allOut.length;i++) {
			if(allOut[i]==pw) {
				allOut[i] = allOut[allOut.length-1];
				allOut = Arrays.copyOf(allOut, allOut.length-1);
				break;
			}
		}
		
		System.out.println(Arrays.toString(allOut));
	}
}
